package com.org.Bibliotech;

/**
 * Created by Joshua on 6/7/2014.
 */
public class Book {
    private String title;
    private String author;
    private int publicationYear;

    public Book(String title, String author, int year ){
        this.title = title;
        this.author = author;
        this.publicationYear = year;
    }


    public boolean equals(Object _book){

        Book book =  (Book) _book;
        return title.equals(book.title) &&
                author.equals(book.author) &&
                (publicationYear == book.publicationYear);


    }


    public String getAuthor(){
        return author;
    }

    public String getTitle(){
        return title;
    }

    public int getPublicationYear(){
        return publicationYear;
    }

    public String getDetails(){

        return "Title: " + title +'\n' +
                "Author: " + author + '\n' +
                        "Publication Year: " + publicationYear;
    }


}
